import request from '@/utils/request'
// 获取企业列表
export function getEnterpriseListAPI(params) {
  return request({
    url: '/park/enterprise',
    method: 'get',
    params
  })
}
// 园区管理-添加企业
export function addEnterpriseAPI(data) {
  return request({
    url: '/park/enterprise',
    method: 'post',
    data
  })
}
// 园区·1管理查看企业
export function getEnterpriseAPI(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'get'
  })
}
// 园区管理编辑企业
export function editEnterpriseAPI(data) {
  return request({
    url: `/park/enterprise`,
    method: 'put',
    data
  })
}
// 园区管理删除企业
export function delEnterpriseAPI(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'delete'
  })
}
// 查询所在行业
export function getIndustryAPI() {
  return request({
    url: '/park/industry',
    method: 'get'
  })
}
// 查找楼宇
export function getBuildingAPI() {
  return request({
    url: '/park/building'
  })
}
// 添加续租企业合同
export function addReletRentAPI(data) {
  return request({
    url: '/park/enterprise/rent',
    method: 'post',
    data
  })
}
// 获取当前的合同列表
export function getRentListAPI(id) {
  return request({
    url: `/park/enterprise/rent/${id}`
  })
}
// 园区管理-退租租赁合同
export function delRentAPI(id) {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'put'
  })
}
// 园区管理-删除企业的租赁合同
export function deleteRentAPI(id) {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'delete'
  })
}
// 上传文件
export function uploadFileAPI(data) {
  return request({
    url: '/upload',
    method: 'post',
    data
  })
}
